wayland: Update parent of dialogs without transient
authorOlivier Fourdan <ofourdan@redhat.com>
Tue, 8 Dec 2015 15:33:45 +0000 (16:33 +0100)
committerOlivier Fourdan <ofourdan@redhat.com>
Fri, 8 Jan 2016 10:55:41 +0000 (11:55 +0100)
commit120088b15f082c2da62a8cea25ba7da53ddb69d6
treeb87cb19f212032a90977a2a9816d472a4e265a7e
parent28f011eb055673d8944cd6e012bc5d84bae41a26
wayland: Update parent of dialogs without transient

X11 has the notions of "transient for group", and while it's an ICCCM
violation, it's commonly used and documented that a window manager
would treat a window with transient_for set to None to transient for all
windows of its group.

gtk uses this when an application sets a dialog type window but does not
specify an explicit transient.

While this works on X11, there is no such thing as groups in Wayland and
the closest equivalent which is set_parent() in xdg-shell takes only one
parent. This is what is used for modal dialogs.

To get something similar in behavior to what is available on X11, a
solution is to update the parent() of the dialogs without transient when
the active surface changes.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759161
gdk/wayland/gdkwindow-wayland.c